;; core/thread.scm - (c) rohan drape, 2003-2005

;; Execute `body ...' in a new thread.  Idiom over 'make-thread*'.

(define-syntax in-thread 
  (syntax-rules ()
    ((_ body ...)
     (make-thread* (lambda () body ...)))))

;; Syntax for defining <parameter> values.  Idiom over
;; 'make-parameter'.

(define-syntax define-parameter
  (syntax-rules ()
    ((_ name)
     (define name (make-parameter #f)))
    ((_ name value)
     (define name (make-parameter value)))
    ((_ name value guard)
     (define name (make-parameter value guard)))))
